package com.ls.thread.produce_consumer;

public class Consumer implements Runnable {

	
	private  Stroe stroe;
	
	
	public Consumer(Stroe stroe) {
		super();
		this.stroe = stroe;
	}


	@SuppressWarnings("static-access")
	@Override
	public void run() {
		
		while(true){
			
//			System.err.println("消费者正在消费产品.............");
			
				
				stroe.subpro();
				
				try {
					Thread.currentThread().sleep(1000);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
		}
		
			
			
			
		}
		
	

}
